JavaScript

A5.ButtonTogglegetValue Method

Syntax

A5.ButtonToggle.getValue([buttons])

Arguments

buttonsstringelementarray

The specific BUTTON elements to get the value(s) of.

Returns

valuebooleannumberarray

The value(s) of the toggle button(s).

Description

Get the value of some or all of the BUTTON elements bound to the A5.ButtonToggle control.

Discussion

If more then one button is bound to the A5.ButtonToggle and no explicit buttons are passed in, or multiple buttons are passed in, an array of values will be returned. If a single button is bound, or a single button is passed in, the state of the button will be returned as a boolean if the button is "two-state", or a number if the button is "multi-state".

Example

// assume "playButton" is an A5.ButtonToggle and bEle is the specific BUTTON element
var playing = playButton.getValue(bEle);
if(playing == 0){
	// paused
} else{
	// playing
}